1. Technical Field
The present invention relates to image processing and more particularly to a technique for automatically determining control points or trackers along a contour of a desired region or object in an image displayed on a display screen in order to extract the desired region or object.
2. Prior Art
Some known image processing software programs for composing and editing images are provided with an optional tool for detecting the contour of a particular region or object on an image in order to select the particular region or object. Heretofore, this contour detection has been generally performed by tracing the contour by using a pointing device such as a mouse. The contour trace using the pointing device is disclosed in the following publications.
For example, a method for extracting a region is disclosed in Japanese Patent Publication No. 5-233810. The method comprises the steps of roughly tracing a contour line of a region to be extracted in a displayed original image by using a pointing device to thereby specify a rough contour line containing the contour line; calculating an edge magnitude for each pixel of the original image in the rough contour line; setting, as an object to be deleted, each pixel having the edge magnitude equal to or less than a predetermined threshold value; applying center line extraction processing until there remains no pixel that can be deleted; and while increasing the threshold value, repeatedly applying the center line extraction processing to the rough contour line until a thin line having a line thickness of one pixel is obtained as a result of thinning, which is used as the contour line.
An apparatus for extracting the image is disclosed in Japanese Patent Publication No. 6-325176. The apparatus is provided with contour specifying means comprising a pointing device for inputting line segments crossing a contour line of a source image on an image display; intersection detection means for detecting intersections of the line segments inputted by the pointing device and the contour line of the source image; an intersection information memory for storing information about the intersections detected by the intersection detection means; and polygonal contour line forming means for forming a polygonal contour line connecting the intersections corresponding to the intersection information in the intersection information memory.
Another method for extracting a region is disclosed in Japanese Patent Publication No. 8-77336. The method comprises the steps of displaying, on display means, an original image stored in storage means; specifying and inputting a belt-like outer-edge region by pointing means so as to contain a contour section being displayed; calculating a difference between each pixel of the original image in the outer-edge region and each of adjacent pixels in a color space; and determining that a partial image having a contour line connecting the pixels having a maximum difference is the region to be extracted in the original image.
It is difficult for an unskilled user to trace a contour on a screen by using a pointing device such as a mouse. The user has to either retry several times or slowly trace the contour in order to correctly trace the contour.
It is therefore an object of the present invention to provide a method capable of easily detecting a contour of a region or object to be extracted in an image without the need to trace the contour.
It is another object of the present invention to provide a computer readable storage medium which stores a program for implementing the method.
According to a first aspect of the present invention, there is provided a method for automatically determining trackers along a contour of a particular object in a displayed image, comprising the steps of:
establishing an initial region containing the particular object therein and setting a plurality of initial points on a boundary of the initial region;
setting a target point for scanning the image from each of the plurality of initial points toward the inside of the initial region;
selecting one or more tracker candidate points along a line segment between each of the plurality of initial points and the target point, based on the magnitude of the contour; and
determining a set of tracker candidate points which minimizes a cost, by using dynamic programming, starting from a selected initial point among the plurality of initial points.
According to a second aspect of the present invention, there is provided a computer readable storage medium storing a program for implementing a method for automatically determining trackers along a contour of a particular object in a displayed image, said program comprising:
program code means for establishing an initial region containing the particular object therein and setting a plurality of initial points on a boundary of the initial region;
program code means for setting a target point for scanning the image from each of the plurality of initial points toward the inside of the initial region;
program code means for selecting one or more tracker candidate points along a line segment between each of the plurality of initial points and the target point, based on the magnitude of the contour; and
program code means for determining a set of tracker candidate points which minimizes a cost, by using dynamic programming, starting from a selected initial point among the plurality of initial points.